package com.sikaryofficial.workbench.domain.dto.resp.goods;

/**
 * @author : qinjinyuan
 * @desc : 商品DTO
 * @date : 2024/09/23 17:08
 */

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.sikaryofficial.workbench.domain.vo.goods.GoodsMaterialVO;
import com.sikaryofficial.workbench.domain.vo.goods.GoodsRelationVO;
import com.sikaryofficial.workbench.utils.GoodsUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

@Getter
@Setter
@ToString
@ApiModel(value = "商品DTO出参对象", description = "商品DTO出参对象")
public class GoodsDTO implements Serializable {

    /**
     * 商品ID
     */
    @ApiModelProperty(value = "商品ID", example = "1")
    private Long goodsId;
    /**
     * 商品名称
     */
    @ApiModelProperty(value = "商品名称", example = "SKE")
    private String goodsName;
    /**
     * 商品编码
     */
    @ApiModelProperty(value = "商品编码", example = "SKE_CRYSTALL_S2000_9528_disposable")
    private String goodsCode;
    /**
     * 电池容量，单位？
     */
    @ApiModelProperty(value = "电池容量，单位： 毫安小时 mAh", example = "1000")
    private Integer batteryCapacity;
    /**
     * 烟油容量, 单位？ mg
     */
    @ApiModelProperty(value = "烟油容量, 单位：毫升 ml", example = "1000")
    private Integer liquidCapacity;
    /**
     * 口吸数
     */
    @ApiModelProperty(value = "口吸数", example = "1")
    private Integer puffNum;
    /**
     * 币种
     */
    @ApiModelProperty(value = "币种", example = "USD")
    private String currency;
    /**
     * 零售单价
     */
    @ApiModelProperty(value = "零售单价-Retail单位:美元/支", example = "8.9")
    private BigDecimal unitPrice;

    /**
     * 零售单价-现价
     */
    @ApiModelProperty(value = "零售单价现价-Retail单位:美元/支", example = "8.9")
    private BigDecimal currentUnitPrice;

    /**
     * 尼古丁含量, 单位：mg/ml
     */
    @ApiModelProperty(value = "尼古丁含量, 单位：mg/ml", example = "1")
    private Integer nicotineCapacity;

    /**
     * 批发价格
     */
    @JsonIgnore
    private BigDecimal wholesaleUnitPrice;
    /**
     * 批发价格-现价
     */
    @JsonIgnore
    private BigDecimal currentWholesaleUnitPrice;
    /**
     * 型号
     */
    @ApiModelProperty(value = "型号", example = "9309")
    private String model;
    /**
     * 品牌编码
     */
    @ApiModelProperty(value = "品牌编码", example = "SKE")
    private String brandNo;
    /**
     * 款式: style:disposable 一次性,cartridge 弹药筒,other 其他
     */
    @ApiModelProperty(value = "款式: style:disposable 一次性,cartridge 弹药筒,other 其他", example = "disposable")
    private String style;
    /**
     * 品牌封面图片
     */
    @ApiModelProperty(value = "品牌封面图片", example = "sikary/2024/08/01/20240801193813AA788.png")
    private String coverUrl;
    /**
     * 综合评分(小数)
     */
    @ApiModelProperty(value = "综合评分(小数)", example = "4.5")
    private BigDecimal compositeScore;

    @ApiModelProperty(value = "style 与 brandNo 组合")
    private String styleAndBrandNo;

    public String getStyleAndBrandNo() {
        return GoodsUtil.buildStyleAndBrandNo(style, brandNo);
    }

    @ApiModelProperty(value = "商品口味关系数据集合")
    private List<GoodsRelationVO> goodsRelations;

    @ApiModelProperty(value = "商品素材集合")
    private List<GoodsMaterialVO> materials;

    @ApiModelProperty(value = "商品描述集合")
    private List<GoodsDescDTO> goodsDescs;
}
